// 宠物相关API服务
const request = require('../utils/request');

// 添加宠物
const addPet = (data) => {
  return request.post('/pet', data);
};

// 更新宠物
const updatePet = (data) => {
  return request.put('/pet', data);
};

// 删除宠物
const deletePet = (id) => {
  return request.delete(`/pet/${id}`);
};

// 获取宠物详情
const getPetDetail = (id) => {
  return request.get(`/pet/${id}`);
};

// 获取用户的宠物列表
const getPetList = (page = 1, size = 10) => {
  return request.get('/pet/list', { page, size });
};

module.exports = {
  addPet,
  updatePet,
  deletePet,
  getPetDetail,
  getPetList
}; 